Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ORA staff grader mfe endpoints upgraded (not for review yet) #2094

Conversation

nandodev-net
Copy link

@nandodev-net nandodev-net commented Oct 25, 2023

ORA staff grader endpoints upgrade

For this PR we have the following goals:

  • Create the /api/ora_staff_grader/assessments/feedback endpoint in order to list the assessments grades based on the type (received or given) for a specific submission.
  • Update the /api/ora_staff_grader/initialize endpoint in order to add the fullname and email fields.

Descriptions

/api/ora_staff_grader/assessments/feedback

This endpoint fetches assessment details for a given submission UUID, assessment_fillter [given, received] and ORA_location, including scorer information and scoring details in order to fill the following Staff Grade MFE table:

Descripción alternativa 1

edx-ora2

  • openassessment/staffgrader/staff_grader_mixin.py
  • openassessment/data.py

edx-platform

  • lms/djangoapps/ora_staff_grader/constants.py
  • lms/djangoapps/ora_staff_grader/ora_api.py
  • lms/djangoapps/ora_staff_grader/serializers.py
  • lms/djangoapps/ora_staff_grader/urls.py
  • lms/djangoapps/ora_staff_grader/views.py
Click here! to see `/api/ora_staff_grader/assessments/feedback` output
  {
      "assessments": [
          {
              "id_assessment": "17",
              "scorer_name": "Fernando Gonzalez",
              "scorer_username": "admin",
              "scorer_email": "[email protected]",
              "assesment_date": "17-10-2023",
              "assesment_scores": [
                  {
                      "criterion_name": "Ideas",
                      "score_earned": 5,
                      "score_type": "Good"
                  },
                  {
                      "criterion_name": "Content",
                      "score_earned": 5,
                      "score_type": "Excellent"
                  }
              ],
              "problem_step": "Staff",
              "feedback": "OVERALL WENO"
          },
      ]
  }

 

 

/api/ora_staff_grader/initialize

This is a pre-existing endpoint to which two extra fields are added [fullname, email].

Descripción alternativa 2

Modifications were made in the following directories:

edx-ora2

  • /openassessment/staffgrader/tests/test_list_staff_workflows.py
  • openassessment/staffgrader/serializers/submission_list.py
  • openassessment/staffgrader/staff_grader_mixin.py
  • openassessment/data.py

edx-platform

  • lms/djangoapps/ora_staff_grader/serializers.py
Click here! to see `/api/ora_staff_grader/initialize` output
...
...
    "submissions": {
        "619b8fb2-ebc0-49ed-9b35-4700efb28f66": {
            "submissionUUID": "619b8fb2-ebc0-49ed-9b35-4700efb28f66",
            "username": "admin",
            "email": "[email protected]",
            "fullname": "Fernando Gonzalez",
            "teamName": null,
            "dateSubmitted": "2023-10-13 15:36:13.781179+00:00",
            "dateGraded": "2023-10-17 20:26:07.146547+00:00",
            "gradedBy": "admin",
            "gradeStatus": "graded",
            "lockStatus": "unlocked",
            "score": {
                "pointsEarned": 10,
                "pointsPossible": 10
            }
        }
    },

 

Testing

In order to test this, you can use the API platform Postman:

  1. Get an auth token from /oauth2/access_token/
  • /api/ora_staff_grader/initialize: params: oraLocation
  • /api/ora_staff_grader/assessments/feedback: params: oraLocation, submissionUUID, assessmentFilter = [given, received]

 

This upgrade will consist of two PRs: one for ORA and the other for edx-platform. This is because the main serializer of the service resides in the platform. To test it, you'll need to fetch and set up the version of the platform with the serializer modification.

@openedx-webhooks
Copy link

Thanks for the pull request, @nandodev-net! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

This is currently a draft pull request. When it is ready for our review and all tests are green, click "Ready for Review", or remove "WIP" from the title, as appropriate.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Oct 25, 2023
@nandodev-net nandodev-net changed the title feat: ORA staff grader mfe endpoints upgraded (not for review) feat: ORA staff grader mfe endpoints upgraded (not for review yet) Oct 25, 2023
@openedx-webhooks
Copy link

@nandodev-net Even though your pull request wasn’t merged, please take a moment to answer a two question survey so we can improve your experience in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants